// store/index.ts
import { createStore } from 'vuex';


const store = createStore({
  state: {
    count: 0,
    momentId: '',
  },
  mutations: {
    increment(state: any) {
      state.count++;
    },
    isMomentId(state: any, momentId: any){
      state.momentId = momentId
    }
  },
  actions: {
    increment(context: any) {
      context.commit('increment');
    },
  },
  getters: {
    doubleCount(state: any) {
      return state.count * 2;
    },
  },
});

export default store
